package com.example.batch.entity;/**
 * Created by kete on 2019-05-10.
 */

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 作者：kete
 * 创建时间：2019-05-10 16:41
 * 功能描述：
 * 版本：
 */
public class Person implements Serializable{

    private int id;

    @Size(min = 2, max = 30)
    private String name;

    @Max(value = 100)
    @Min(value = 1)
    private int age;

    private String gender;

    public Person() {

    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }
}
